Fix tiger, google leaks by forcing them into the QString mkshort.
authorrobertlipe <robertlipe@gmail.com>
Wed, 1 Jan 2014 00:13:43 +0000 (00:13 +0000)
committerrobertlipe <robertlipe@gmail.com>
Wed, 1 Jan 2014 00:13:43 +0000 (00:13 +0000)
gpsbabel/google.cc
gpsbabel/tiger.cc

index 2e3e6bc91f7de594e3e5b83eb13a8345e28f4cdd..0ab3e5fd8383b05d57ad2280a889494a3af01aa2 100644 (file)
@@ -124,12 +124,7 @@ void goog_segment(xg_string args, const QXmlStreamAttributes* unused)
 
   wpt_tmp = route_find_waypt_by_name(routehead[goog_segroute], goog_segname);
   if (wpt_tmp) {
-#if NEW_STRINGS
-    wpt_tmp->shortname = QString();
-#else
-    xfree(wpt_tmp->shortname);
-#endif
-    wpt_tmp->shortname = mkshort(desc_handle, CSTRc(args));
+    wpt_tmp->shortname = mkshort(desc_handle, args);
     wpt_tmp->description = args;
   }
 }
index ea902aa96dcd1264d088e3bc7baff2b16eb6573b..7475ab3539d2da080baef98f31eab7b1343f5dc1 100644 (file)
@@ -171,7 +171,7 @@ data_read(void)
       wpt_tmp->longitude = lon;
       wpt_tmp->latitude = lat;
       wpt_tmp->description = desc;
-      wpt_tmp->shortname = mkshort(mkshort_handle, desc);
+      wpt_tmp->shortname = mkshort(mkshort_handle, QString(desc));
 
       waypt_add(wpt_tmp);
     }